/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.h"
#include "string.h"
#include "stdarg.h"
#include "stdbool.h"

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
typedef struct {
    uint8_t recflag;
    uint16_t reclen;
    uint8_t buff[1024];
}DataRec;
typedef struct{
    uint8_t id;
    uint8_t cmd;
    uint8_t  CanRecdata[8];

}CanRecData;

typedef struct{
    bool Find_Home;
    uint8_t Elector1;
    uint8_t Elector2;
    uint8_t Color_Flag;
    float  data;
    uint32_t Start_time ;
    uint32_t Signal_time1;
    uint32_t Signal_time2;

}IRC_SIGNAL;
/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */



/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */
#define SystemVersion_1 1
#define SystemVersion_2 0
#define SystemVersion_3 1
/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define Key1_Pin GPIO_PIN_4
#define Key1_GPIO_Port GPIOC
#define Key2_Pin GPIO_PIN_5
#define Key2_GPIO_Port GPIOC

/* USER CODE BEGIN Private defines */
#define ReadKey1 HAL_GPIO_ReadPin(Key1_GPIO_Port,Key1_Pin)
#define ReadKey2 HAL_GPIO_ReadPin(Key2_GPIO_Port,Key2_Pin)

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
